﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

namespace Razre.Base
{
    /// <summary>
    /// Event Args Class to provide Validation Event Args
    /// </summary>
    public class ValidateEventArgs : EventArgs
    {
        #region ctors

        /// <summary>
        /// Default Constructor initializes default args properties
        /// </summary>
        public ValidateEventArgs()
        {
            IsValid = true;
            ErrorMessages = new ObservableCollection<string>();
        }

        #endregion

        #region props

        /// <summary>
        /// Name of the Property being validated
        /// </summary>
        public string PropertyName { get; set; }

        /// <summary>
        /// ObservableCollection of ErrorMessages found during validation
        /// </summary>
        public ObservableCollection<string> ErrorMessages { get; protected set; }

        /// <summary>
        /// Determination of Valid status
        /// </summary>
        public bool IsValid { get; set; }

        #endregion
    }
}
